package com.wxzz.elearing.comment.api.admin;


import com.wxzz.elearing.comment.dto.AdminQueAnsEnterpriseDto;
import com.wxzz.elearing.comment.dto.ArticleStatusDto;
import com.wxzz.elearing.comment.service.ICommunityEnterpriseQuesAnsService;
import com.wxzz.elearing.comment.service.IEnterpriseQuesAnsService;
import com.wxzz.elearing.comment.vo.CommunityUserInfoVo;
import com.wxzz.elearing.comment.vo.EnterpriseQueAnsVo;
import com.wxzz.elearing.comment.vo.QueAnsUserInfoVo;
import com.wxzz.elearning.common.dto.FeignWxUserDto;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author
 * @since 2021-05-18
 */
@RestController
@RequestMapping("/Community-enterprise-ques-ans")
@Api(tags = "社区用户类接口(总后台)")
public class AdminCommunityEnterpriseQuesAnsController {

    @Resource
    private ICommunityEnterpriseQuesAnsService iCommunityEnterpriseQuesAnsService;

//    @ApiOperation(value = "用户信息(总后台)", notes = "用户信息(总后台)", httpMethod = "POST", tags = "后台")
//    @RequestMapping(value = "userInfo/{userId}", method = RequestMethod.POST)
//    public ReturnVO<FeignWxUserDto> userInfo(@PathVariable(value = "userId") Long userId) {
//        return iCommunityEnterpriseQuesAnsService.getUserInfo(userId);
//    }
//    @ApiOperation(value = "用户信息(总后台)", notes = "用户信息(总后台)", httpMethod = "POST", tags = "后台")
//    @RequestMapping(value = "userInfo/{userId}", method = RequestMethod.POST)
//    public ReturnVO<QueAnsUserInfoVo> userInfo(@PathVariable("userId") Long userId) {
//        return iCommunityEnterpriseQuesAnsService.getUserInfo(userId);
//    }

    @ApiOperation(value = "上下架文章(总后台)", notes = "上下架文章(总后台)", httpMethod = "POST", tags = "后台")
    @RequestMapping(value = "aricleStatus", method = RequestMethod.POST)
    public ReturnVO<CommunityUserInfoVo> changeAricleStatus(@RequestBody ArticleStatusDto articleStatusDto) {
        return iCommunityEnterpriseQuesAnsService.changeAricleStatus(articleStatusDto);
    }
}
